home *** CD-ROM | disk | FTP | other *** search
/ Freelog 15 / FREELOG 15.ISO / WebMaster / Perl / PERL5106.ZIP / perl5 / Lib / OLE.pm < prev    next >
Encoding:
Perl POD Document  |  1996-01-18  |  643 b   |  35 lines

  1. package OLE;
  2.  
  3. # helper routines. see ntole.cpp for all the gory stuff.
  4.  
  5. sub AUTOLOAD {
  6.     my( $self ) = shift;
  7.     $AUTOLOAD =~ s/.*:://o;
  8.   if ( main::Win32OLEDispatch( $self, $AUTOLOAD, $fReturn, @_ ) ) {
  9.       return $fReturn;
  10.   } else {
  11.       return undef;
  12.   }
  13. }
  14.  
  15. sub new {
  16.     my( $class ) = shift;
  17.     my( $class ) = shift if $class eq 'OLE';
  18.     my( $object );
  19.     if ( main::Win32OLECreateObject( $class, $object ) ) {
  20.     return $object;
  21.     } else {
  22.     return undef;
  23.     }
  24. }
  25.  
  26. sub DESTROY {
  27.     my( $self ) = shift;
  28.   main::Win32OLEDestroyObject( $self );
  29.     return undef;
  30. }
  31.  
  32. *CreateObject = \&new;
  33.  
  34. 1;
  35.